path='/root/project/weights/faiss/faiss/train_img_list.txt'
ok_path='/root/project/weights/faiss/faiss/train_img_listv2.txt'

with open(ok_path,'w') as ff:
    with open(path,'r') as fff:
        for ii in fff:
            okii=ii.replace('/mnt/hwfile/opendatalab/ouyanglinke/PDF_Formula/','/root/project/weights/faiss/')
            ff.write(okii)
    
    
    
    
    




